#include <QCoreApplication>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    int t=1;
    int ** A=new int*[5];
    for (int i=0;i<5;i++)
    {
        A[i]=new int[5];
    }
    for (int i=0;i<5;i++)
    {
    for(int j=0;j<5;j++)
    {
        A[i][j]=t++;
    }
    }
    for (int i=0;i<5;i+=2)
    {
    for(int j=1;j<5;j+=2)
    {
        A[i][j]=0;
    }
    }
    for (int i=1;i<5;i+=2)
    {
    for(int j=0;j<5;j+=2)
    {
        A[i][j]=0;
    }
    }
    for (int i=0;i<5;i++)
    {
    for(int j=0;j<5;j++)
    {
        cout<<A[i][j]<<"\t";
    }
    cout<<endl;
    }
    for(int j=0;j<5;j++)
    {
        delete A[j];
    }
    delete A;
    return a.exec();
}
